        <?php
			$adminAuth = $this->session->userdata('intAccountType');
			if($adminAuth!='1')
			{
				header('location:'.base_url().'dashboard/restaurants');
			}
		?>
        <div class="dashboardWrapper">
            <header>
            	<table>
                	<tbody>
                    	<tr>
                        	<td class="logo">SUMMON</td>
                        	<td class="menu">
                            	<ul>
                                	<li>
                                    	<ul>
                                        	<li><a href="<?=base_url()?>dashboard/messages"><i class="icon-envelope"></i> Messages<span class="newMsgCount"></span></a></li>
                                        	<li><a href="<?=base_url()?>dashboard/restaurants"><i class="icon-glass"></i> Restaurants</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </td>
                        	<td class="user">
                                <div class="menuToggleBtn">
                                	<button class="btn" id="toggleMenu">
                                		<i class="icon-align-justify"></i>
                                    </button>
                                </div>
                                <div class="navbar navbar-static">
                                    <ul class="nav" role="navigation">
                                        <li class="dropdown">
                                            <ul class="nav pull-right">
                                                <li id="fat-menu" class="btn-group dropdown">
                                                    <button class="btn dropdown-toggle leftBtn" data-toggle="dropdown" role="button">
                                                        <span class="nameShow">
                                                        <?php
                                                            if($fullname!='')
                                                            {
                                                                echo '<i class="icon-user"></i> '.$fullname;
                                                            }
                                                            else
                                                            {
                                                                echo 'Guest!';	
                                                            }
                                                        ?>
                                                        </span>
                                                        <span class="nameHide">
                                                            <i class="icon-user"></i>
                                                        </span>

                                                    </button>
                                                    <button class="btn dropdown-toggle" data-toggle="dropdown">
                                                        <i class="icon-cog"></i>
                                                    </button>
                                                    <ul class="dropdown-menu" aria-labelledby="drop3" role="menu">
                                                        <li role="presentation">
                                                        	<span class="hiddenName"><?=$fullname?></span>
                                                            <p><?=$userType?></p>
                                                        </li>
                                                        <li role="presentation">
                                                            <a href="<?=base_url()?>dashboard/account_settings/<?=$myID?>" tabindex="-1" role="menuitem"><i class="icon-edit"></i> Account Settings</a>
                                                        </li>
                                                        <li class="divider" role="presentation"></li>
                                                        <li role="presentation">
                                                            <a href="<?=base_url()?>dashboard/logout" tabindex="-1" role="menuitem"><i class="icon-off"></i> Log Out</a>
                                                        </li>
                                                    </ul>
                                                </li>
                                            </ul>
                                        </li>
                                    </ul>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </header>
            <section>
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span2 leftWrapper" id="menuToToggle">
                        	<h2><i class="icon-tasks"></i> Menu</h2>
                        	<div class="hiddenMenu">
                            	<ul>
                                	<li>
                                    	<ul>
                                        	<li><a href="<?=base_url()?>dashboard/messages"><i class="icon-envelope"></i> Messages<span class="newMsgCount"></span></a></li>
                                        	<li><a href="<?=base_url()?>dashboard/restaurants"><i class="icon-glass"></i> Restaurants</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                            <div class="defaultMenu">
                            	<ul>
                                	<li>
                                    	<ul>
                                            <li><a href="<?=base_url()?>dashboard/reserved_lists"><i class="icon-folder-close"></i> Reserved Lists</a></li>
                                            <li><a href="<?=base_url()?>dashboard/list_users"><i class="icon-th-list"></i> Lists of Users</a></li>
                                        	<li><a href="<?=base_url()?>dashboard/accounts_analysis"><i class="icon-th"></i> General Reports</a></li>
                                        	<li><a href="<?=base_url()?>dashboard/account_summary"><i class="icon-list-alt"></i> Summary of New Accounts</a></li>
                                            <li><a href="<?=base_url()?>dashboard/about_us"><i class="icon-info-sign"></i> About the company</a></li>
                                        </ul>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="span10 rightWrapper">
                        	<h2><i class="icon-glass"></i> Restaurants</h2>
                        	<!--Body content-->
                            <ul class="nav nav-tabs">
                                <li>
                                	<a href="<?=base_url()?>dashboard/restaurants"><i class="icon-glass"></i> Lists</a>
                                </li>
                                <li class="active">
                                	<a href="<?=base_url()?>dashboard/add_owner"><i class="icon-plus-sign"></i> Add Owner</a>
                                </li>
                                <li>
                                	<a href="<?=base_url()?>dashboard/add_restaurant"><i class="icon-plus-sign"></i> Add Restaurant</a>
                                </li>
                            </ul>
                            <div class="contentHolder">
								<?php
									$post = $this->input->post();
									if($intStatus=='0')
									{
										$msg = '<div class="box error-box"> <span>Restaurant owner was failed to add.</span></div>';
									}
									else if($intStatus=='1')
									{
										$msg = '<div class="box success-box"> <span>Restaurant owner was successfully added.</span></div>';
									}
									else if($intStatus=='2')
									{
										$msg = '<div class="box error-box"> <span>E-mail is already taken.</span></div>';
									}
									else
									{
										$msg = '';	
									}
									echo $msg;
								?>
                                <form action="<?=base_url()?>dashboard/add_owner" method="POST">
                                    <dl class="dl-horizontal dl-header">
                                        <dt><h5><i class="icon-info-sign"></i> Owner Information</h5></dt>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dt>Firstname</dt>
                                        <dd><input type="text" name="strFirstName" id="strFirstName" value="<?=$this->input->post('strFirstName')?>" required="required" /></dd>
                                        <dt>Middle Initial</dt>
                                        <dd><input type="text" name="strMiddleName" id="strMiddleName" value="<?=$this->input->post('strMiddleName')?>" /></dd>
                                        <dt>Lastname</dt>
                                        <dd><input type="text" name="strLastName" id="strLastName" value="<?=$this->input->post('strLastName')?>" required="required" /></dd>
                                        <dt>Password</dt>
                                        <dd><input type="password" name="strPassword" id="strPassword" value="<?=$this->input->post('strPassword')?>" required="required" /></dd>
                                        <dt>Confirm Password</dt>
                                        <dd><input type="password" name="strRePassword" id="strRePassword" value="<?=$this->input->post('strRePassword')?>" required="required" /></dd>
                                        <dt>Gender</dt>
                                        <dd>
                                            <select name="strGender" class="selectpicker" data-live-search="false">
                                                <option value="">-- Select Gender --</option>
                                                <option value="m">Male</option>
                                                <option value="f">Female</option>
                                            </select>
                                        </dd>
                                        <dt>Civil Status</dt>
                                        <dd>
                                            <select name="strCivilStatus" class="selectpicker" data-live-search="false">
                                                <option value="">-- Select Status --</option>
                                                <option value="single">Single</option>
                                                <option value="married">Married</option>
                                                <option value="separated">Separated</option>
                                                <option value="widowed">Widowed</option>
                                            </select>
                                        </dd>
                                        <dt>Birthday</dt>
                                        <dd>
                                            <select name="strMonth" class="span2 selectpicker" data-live-search="true">
                                                <option value="">-- Month --</option>
                                            <?php
                                                $month = month();
                                                for($x=1; $x<=12; $x++)
                                                {
                                                    echo '<option value="'.$month[$x].'">'.$month[$x].'</option>';
                                                }
                                            ?>
                                            </select>
                                            <select name="strDays" class="span2 selectpicker" data-live-search="true">
                                                <option value="">-- Day --</option>
                                            <?php
                                                $day = day();
                                                for($x=1; $x<=31; $x++)
                                                {
                                                    echo '<option value="'.$day[$x].'">'.$day[$x].'</option>';
                                                }
                                            ?>
                                            </select>
                                            <select name="strYear" class="span2 selectpicker" data-live-search="true">
                                                <option value="">-- Year --</option>
                                            <?php
                                                $year = year();
                                                foreach($year as $key=>$val)
                                                {
                                                    echo '<option value="'.$val.'">'.$val.'</option>';
                                                }
                                            ?>
                                            </select>
                                        </dd>
                                    </dl>
                                    <dl class="dl-horizontal dl-header">
                                        <dt><h5><i class="icon-map-marker"></i> Owner Location</h5></dt>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dt>Address</dt>
                                        <dd><input type="text" name="strAddress" id="strAddress" value="<?=$this->input->post('strAddress')?>" /></dd>
                                        <dt>City</dt>
                                        <dd><input type="text" name="strCity" id="strCity" value="<?=$this->input->post('strCity')?>" /></dd>
                                        <dt>Hometown</dt>
                                        <dd><input type="text" name="strHometown" id="strHometown" value="<?=$this->input->post('strHometown')?>" /></dd>
                                        <dt>Province</dt>
                                        <dd><input type="text" name="strProvince" id="strProvince" value="<?=$this->input->post('strProvince')?>" /></dd>
                                        <dt>Country</dt>
                                        <dd>
                                            <?=form_countries('country')?>
                                        </dd>
                                    </dl>
                                    <dl class="dl-horizontal dl-header">
                                        <dt><h5><i class="icon-tint"></i> Owner Contact</h5></dt>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dt>Mobile Phone</dt>
                                        <dd><input type="text" name="strMobile" id="strMobile" value="<?=$this->input->post('strMobile')?>" /></dd>
                                        <dt>Landline No.</dt>
                                        <dd><input type="text" name="strLandline" id="strLandline" value="<?=$this->input->post('strLandline')?>" /></dd>
                                        <dt>E-mail Address</dt>
                                        <dd><input type="text" name="strEmail" id="strEmail" value="<?=$this->input->post('strEmail')?>" required="required" /></dd>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dd><button class="btn btn-primary" name="doAddOwner" value="add_owner"><i class="icon-ok-sign"></i> Submit</button></dd>
                                    </dl>   
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
            <footer>


            </footer>
        </div>
